/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.com.ugto.caadi.asistencias.dao;

import java.util.List;
import mx.com.ugto.caadi.asistencias.bean.Rol;
import mx.com.ugto.caadi.asistencias.exception.DataAccessLayerException;

/**
 *
 * @author Maestria
 */
public class RolDAO extends AbstractDao {

    public RolDAO() {
        super();
    }

    /**
     * Insert a new estado into the database.
     * @param rol
     */
    public void create(Rol rol) throws DataAccessLayerException {
        super.create(rol);
    }

    /**
     * Delete a detached estado from the database.
     * @param rol
     */
    public void delete(Rol rol) throws DataAccessLayerException {
        super.delete(rol);
    }

    /**
     * Find an estado by its primary key.
     * @param id
     * @return
     */
    public Rol find(Integer id) throws DataAccessLayerException {
        return (Rol) super.find(Rol.class, id);
    }

    /**
     * Updates the state of a detached estado.
     *
     * @param rol
     */
    public void update(Rol rol) throws DataAccessLayerException {
        super.update(rol);
    }

    /**
     * Finds all estados in the database.
     * @return
     */
    public List findAll() throws DataAccessLayerException {
        return super.findAll(Rol.class);
    }
}
